r = 1 clown = 3 gotbeer = 1 oldman = 1 pin = 0 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 15) AS STRING directions(1) = "NORTH" directions(2) = "NORTH OR SOUTH" directions(3) = "NORTH OR WEST" directions(4) = "NORTH OR SOUTH" directions(5) = "NORTH OR SOUTH" directions(6) = "NORTH OR SOUTH" directions(7) = "WEST OR SOUTH" directions(8) = "EAST OR WEST" directions(9) = "EAST OR SOUTH" directions(10) = "NORTH OR WEST" directions(11) = "NORTH OR EAST" directions(12) = "NORTH OR SOUTH" directions(13) = "NORTH OR SOUTH" directions(14) = "NORTH OR SOUTH" PRINT "" PRINT "" PRINT "Another boring night, in the same boring town just like always. But" PRINT "you figure what the hell, it's Friday night, you have a beer in hand." PRINT "So how lame is this going to be? God only knows. The line is short and" PRINT "the beer is cold." DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " Inside the Mouth of the Clown " PRINT " Amusement Series II " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2015" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 IF r = 10 THEN: GOSUB r10 IF r = 11 THEN: GOSUB r11 IF r = 12 THEN: GOSUB r12 IF r = 13 THEN: GOSUB r13 IF r = 14 THEN: GOSUB r14 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotwalkietalkie = 1 THEN: PRINT "WALKIE TALKIE" IF gotphoto = 1 THEN: PRINT "PHOTO" PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 10 THEN: r = 9: GOTO moved IF r = 11 THEN: r = 12: GOTO moved IF r = 12 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 14: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 2 THEN: r = 3: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 7: GOTO moved IF r = 11 THEN: r = 10: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 15 THEN: r = 14: GOTO moved IF r = 14 THEN: r = 13: GOTO moved IF r = 13 THEN: r = 12: GOTO moved IF r = 12 THEN: r = 11: GOTO moved IF r = 9 THEN: r = 10: GOTO moved IF r = 7 THEN: r = 6: GOTO moved IF r = 6 THEN: r = 5: GOTO moved IF r = 5 THEN: r = 4: GOTO moved IF r = 4 THEN: r = 3: GOTO moved IF r = 2 THEN: r = 1: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 3 THEN: r = 2: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 9: GOTO moved IF r = 10 THEN: r = 11: GOTO moved END IF IF (cmd$ = "TALK TO CLOWN") AND r = 5 THEN CLS PRINT "...He says nothing to you." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO CLOWN") AND r = 8 THEN CLS PRINT "How are you tonight, sir? Lovely night for the fun house." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO CLOWN") AND r = 14 THEN CLS PRINT "In a tired and almost dead tone. He speaks in such a way that one would" PRINT "wonder what his Doctor perscribed him and if he was willing to sell you some." PRINT "You sir, are our ten thousand visitor to Pete's Fun House in the Province" PRINT "For being so lucky I give you this pin. Congrats sir, don't forget to visit" PRINT "the beer tent. He hands you the pin." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO CLOWN") AND r = 5 THEN CLS PRINT "...He says nothing to you." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO CLOWN") AND r = 5 THEN CLS PRINT "...He says nothing to you." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TALK TO OLD MAN") AND r = 11 THEN CLS PRINT "He calmy nods and continues sitting in silence." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE BEER") AND r = 15 THEN CLS PRINT "Golden cans, holding the wonders of beer. The label reads Golden Crest." PRINT "Finely Crafted Lager." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "DRINK BEER") AND gotbeer = 1 THEN CLS PRINT "In three gulps. You finish the cold drink. Not bad, not bad at all." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" PRINT "You drink a little to much and wander off..." GOTO r1: END IF IF (cmd$ = "EXAMINE BEER") AND gotbeer = 1 THEN CLS PRINT "Just your standard draft. I forget the brand, but beer is beer." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE PIN") AND gotpin = 1 THEN CLS PRINT "A silver pin, with the face of a clown stamped on it. How odd...this is going" PRINT "into my coffee can at home." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "GIVE BEER") AND gotbeer = 1 AND r = 11 THEN CLS PRINT "You hand the old man your ice cold beer but he doesn't take it." PRINT "Instead he gives you a nod and closes his eyes." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "TAKE PIN" OR cmd$ = "GET PIN") AND gotpin = 0 AND r = 14 THEN gotpin = 1 PRINT "Another one for the collection. Perfect." GOTO win: END IF moved: RETURN r1: PRINT "You are standing in the entranceway of the supposed ride that went" PRINT "by the name -Mouth of the Clown-. Though the attraction looked as if " PRINT "it were constructed out of plywood and coated in a layer of spray paint." RETURN r2: PRINT "As the line slowly inches forward, you make your way through the mouth," PRINT "and into the main hallway of the place. It's setup like a massive fun" PRINT "house. In the distance you can hear people scream and laugh. Though you" PRINT "wonder if it's just some dumb teens overreacting?" RETURN r3: PRINT "The faint smell of fried foods woft through the hallway. Many mirrors" PRINT "and portraits of clowns decorate the place. Circus music is playing in" PRINT "the background with a laugh track. Odd..." RETURN r4: PRINT "Slowly you enter a small crypt with cardboard tombstones are leaning" PRINT "up against the wall. Though the names are hard to read as a wall of" PRINT "fog blows towards you." RETURN r5: PRINT "A woman in her late teens whose recieving a piggy back ride is laughing" PRINT "away and brushes past you. Quickly following behind the pair is a clown." PRINT "Now that's something you don't see everyday!" RETURN r6: PRINT "As you make your way past the makeshift graveyard and through the" PRINT "thick wall of fog that had such an odor to it. The music slowly" PRINT "faded out an a loud voice boomed over the intercom. -Welcome to" PRINT "my home. I hope you enjoy it...if you survive.- This was followed" PRINT "by a sickening laughter that one would expect to find on some" PRINT "haunted halloween tape." RETURN r7: PRINT "As the small crowd begins to gather around the end of the hall. We are" PRINT "greeted by two large barn doors. Painted in white and decorated with" PRINT "messy dots of red and blue paint." RETURN r8: PRINT "The annoying chatter of everyone talking amongst themselves really can" PRINT "you out of the mood that is being setup before you. Just as you think" PRINT "this two young men dressed as clowns, holding pies, walked up to those" PRINT "talking loudly and threw those pies right in their faces. Oddly enough" PRINT "I though this was a little much. Before I could carry on, the odd figure" PRINT "of a clown stood in my way. He looks you dead in the eye's..." RETURN r9: PRINT "Slowly and surely you notice that the number of people you have came in" PRINT "with are dwindling down. You begin to wonder just what is going on?" RETURN r10: PRINT "In the distance you can see a bright light coming from the exit. As " PRINT "you continue to make your way down. You see an old man sitting on a" PRINT "wooden crate." RETURN r11: PRINT "You approach the old man and stop in your tracks. As the others ignore" PRINT "him and go about their conversations and whatnot. He just stares at you." IF gotbeer = 0 THEN: PRINT "It's a shame you drank your beer already. He may have wanted it?" IF gotbeer = 1 THEN: PRINT "You hand him the plastic cup of beer. But he doesn't take it..." RETURN r12: PRINT "With every step you take, you get closer to the exit, and with it about" PRINT "ten minutes of the night wasted. Maybe the wild west ride would have been" PRINT "a better ride? But it wasn't all bad...oh hell its was quite lame. You think" PRINT "to yourself." RETURN r13: PRINT "As you make your way closer to the exit, the music from the carnival speakers" PRINT "begin's to grow louder, and the laughter of clowns grows dimmer." RETURN r14: PRINT "Before you reach the exit, you notice that standing in front of the exit" PRINT "was a tall pale man. Dressed as a sad clown with his face painted in a frown." PRINT "His wig is soaked, probably cause some kids were throwing water balloons or" PRINT "something." RETURN win: COLOR 2, 0 CLS PRINT "You walk out of the fun house and take a deep breath. What a night? What" PRINT "a strange little carnival? Only in this hick town would you go through" PRINT "something like this. Not like the last time was any better or worse. But" PRINT "at least this time you got a pin out of it." PRINT DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "Well you took to long in venturing through the fun house. Now the park" PRINT "is closed for the night and you can't even get yourself a beer. Pity." _DISPLAY END END SUB